﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using kp.koordinator.contract;
using kp.plotter.contract;

namespace integrationtest
{
    public partial class MockPortal : Form
    {
        private IPlotter plotter;
        private IKoordinator koordinator;

        public MockPortal(IKoordinator koordinator, IPlotter plotter)
        {
            InitializeComponent();

            this.plotter = plotter;
            this.koordinator = koordinator;

            UserControl ctlPlotter = (UserControl)plotter;
            ctlPlotter.Location = this.pictureBox1.Location;
            ctlPlotter.Size = this.pictureBox1.Size;
            this.Controls.Add(ctlPlotter);
            this.pictureBox1.Visible = false;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.plotter.ShowPlot(
                //this.koordinator.Berechne("2*x", 0, 10, this.plotter.Werteanzahl)
                new[] { new PointF(3, 3), new PointF(4, 4), new PointF(5,5)}
                );
        }
    }
}
